package com.fpf.service;

import com.fpf.domain.GetAnswerDTO;
import com.gcxy.common.config.result.R;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import java.util.concurrent.atomic.AtomicBoolean;

public interface IWindowTextService {

    //异步方法调用
    CompletableFuture<R> getAnswer(GetAnswerDTO getAnswerDTO);

    /**
     * 新增的流式回答接口
     * @param getAnswerDTO
     * @param chunkConsumer
     * @param stopFlag
     */
    void getAnswerStream(GetAnswerDTO getAnswerDTO, Consumer<String> chunkConsumer, AtomicBoolean stopFlag);
}
